//
//  EditAlipayVC.m
//  MyProject
//
//  Created by jiaming yan on 2018/3/29.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "EditAlipayVC.h"

@interface EditAlipayVC ()
@property (weak, nonatomic) IBOutlet UITextField *nameTextField;
@property (weak, nonatomic) IBOutlet UITextField *againNameTextField;

@end

@implementation EditAlipayVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationItem.title = @"编辑支付宝账户";
    self.view.backgroundColor = UIColorFromRGB(0XF2F5FA);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)finishClick:(id)sender {
    if (self.nameTextField.text.length == 0) {
        ALERT_VIEW(@"请输入支付宝账号");
        return;
    }
    [YJMSendRequest postDataWithParameters:@{@"alipayAccount":self.nameTextField.text} url:@"user/updateUserAlipayAccount" result:^(NSDictionary *result, NSError *error) {
        result = [CommonUtils decryptDicWithResult:result];
        [self hideProgress:self.view animated:YES];
        if([result[@"result"] integerValue] == 1)
        {
            [self.navigationController popViewControllerAnimated:YES];
            
        }else{
            
            [CommonUtils showToast:[result objectForKey:@"msg"]];
        }
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
